#!/bin/bash
##遍历某个目录下所有脚本是否出现Bug
for i in `find . -name \*.sh`;do
	if [ -z `sh -n $i` ];then
		cat $i
		echo -e  "\n正在查看${i}文件"
		read pp
	else
		echo -e "${i}文件有语法错误，请检查"
		cat ${i}
		echo -e "\n正在查看$i文件"
		read pp
	fi	
done
for i in `find . -name Y`;do
        if [ -z `sh -n $i` ];then
		cat $i
		echo -e "\n正在查看${i}文件"
		read pp
        else
                echo -e "${i}文件有语法错误，请检查"
		cat $i
		echo -e "\n正在查看${i}文件"
		read pp
        fi
done
